home *** CD-ROM | disk | FTP | other *** search
Wrap
ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) NNNNAAAAMMMMEEEE _ffff_wwww_ssss_cccc_aaaa_nnnn_ffff_:::: _ffff_wwww_ssss_cccc_aaaa_nnnn_ffff_,,,, _wwww_ssss_cccc_aaaa_nnnn_ffff_,,,, _ssss_wwww_ssss_cccc_aaaa_nnnn_ffff - convert formatted wide-character input SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_dddd_iiii_oooo_...._hhhh_>>>> _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_wwww_cccc_hhhh_aaaa_rrrr_...._hhhh_>>>> _iiii_nnnn_tttt _ffff_wwww_ssss_cccc_aaaa_nnnn_ffff_((((_FFFF_IIII_LLLL_EEEE _****_ssss_tttt_rrrr_eeee_aaaa_mmmm_,,,, _cccc_oooo_nnnn_ssss_tttt _wwww_cccc_hhhh_aaaa_rrrr______tttt _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _...._...._...._))))_;;;; _iiii_nnnn_tttt _wwww_ssss_cccc_aaaa_nnnn_ffff_((((_cccc_oooo_nnnn_ssss_tttt _wwww_cccc_hhhh_aaaa_rrrr______tttt _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _...._...._...._))))_;;;; _iiii_nnnn_tttt _ssss_wwww_ssss_cccc_aaaa_nnnn_ffff_((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _cccc_oooo_nnnn_ssss_tttt _wwww_cccc_hhhh_aaaa_rrrr______tttt _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _...._...._...._))))_;;;; DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN _ffff_wwww_ssss_cccc_aaaa_nnnn_ffff reads from the stream _s_t_r_e_a_m. _wwww_ssss_cccc_aaaa_nnnn_ffff reads from the standard input stream _s_t_d_i_n. _ssss_wwww_ssss_cccc_aaaa_nnnn_ffff reads from the wide-character string *_s. Each function reads wide-characters, interprets them according to a format, and stores the results in its arguments. Each expects, as arguments, a control wide-character string _f_o_r_m_a_t described below, and a set of pointer arguments indicating where the converted input should be stored. If there are insufficient arguments for the format, the behavior is undefined. If the format is exhausted while arguments remain, the excess arguments are simply ignored. The control string usually contains conversion specifications, which are used to direct interpretation of input sequences. The control string may contain: 1. White-space wide-characters (blanks, tabs, newlines, or form- feeds) that, except in two cases described below, cause input to be read up to the next non-white-space character. 2. An ordinary wide-character (not _%%%%) that must match the next character of the input stream. 3. Conversion specifications consisting of the character _%%%% or the character sequence _%%%%_d_i_g_i_t_s_$$$$, an optional assignment suppression character _****, a decimal digit string that specifies an optional numerical maximum field width, an optional letter _llll (ell), _LLLL, or _hhhh indicating the size of the receiving object, and a conversion code. The conversion wide-characters _cccc, _ssss and _[[[[ must be preceded by _llll _((((_eeee_llll_llll_)))) if the corresponding argument is a pointer to wchar_t rather than a pointer to a character type. The conversion wide-characters _dddd, _iiii and _nnnn must be preceded by _hhhh if the corresponding argument is a pointer to short int rather than a pointer to int, or by _llll _((((_eeee_llll_llll_)))) if it is a pointer to long int. Similarly, the conversion wide-characters _oooo, _uuuu and _xxxx must be preceded by _hhhh if the corresponding argument is a pointer to unsigned short int rather than a pointer to unsigned int or by _llll PPPPaaaaggggeeee 1111 ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) _((((_eeee_llll_llll_)))) if it is a pointer to unsigned long int. The conversion wide-characters _eeee, _ffff and _gggg must be preceded by _llll _((((_eeee_llll_llll_)))) if the corresponding argument is a pointer to double rather than a pointer to float, or by _LLLL if it is a pointer to long double. If an _hhhh, _llll _((((_eeee_llll_llll_)))) or _LLLL appears with any other conversion wide- character, the behaviour is undefined. A conversion wide-character specification directs the conversion of the next input field; the result is placed in the variable pointed to by the corresponding argument unless assignment suppression was indicated by the character _****. The suppression of assignment provides a way of describing an input field that is to be skipped. An input field is defined as a string of non-space wide-characters; it extends to the next inappropriate wide-character or until the maximum field width, if one is specified, is exhausted. For all descriptors except the character _[[[[ and the character _cccc, white space leading an input field is ignored. Conversions can be applied to the _n_t_h argument in the argument list, rather than to the next unused argument. In this case, the conversion character _%%%% (see above) is replaced by the sequence _%%%%_d_i_g_i_t_s_$$$$ where _d_i_g_i_t_s is a decimal integer _n, giving the position of the argument in the argument list. The first such argument, _%%%%_1111_$$$$, immediately follows _f_o_r_m_a_t. The control string can contain either form of a conversion specification, i.e., _%%%% or _%%%%_d_i_g_i_t_s_$$$$, although the two forms cannot be mixed within a single control string. The conversion code indicates the interpretation of the input field; the corresponding pointer argument must usually be of a restricted type. For a suppressed field, no pointer argument is given. The following conversion codes are valid: _%%%% A single _%%%% is expected in the input at this point; no assignment is done. _dddd Matches an optionally signed decimal integer, whose format is the same as expected for the subject sequence of the _wwww_cccc_ssss_tttt_oooo_llll function with the value 10 for the _b_a_s_e argument. The corresponding argument should be a pointer to integer. _uuuu Matches an optionally signed decimal integer, whose format is the same as expected for the subject sequence of the _wwww_cccc_ssss_tttt_oooo_uuuu_llll function with the value 10 for the _b_a_s_e argument. The corresponding argument should be a pointer to unsigned integer. _oooo Matches an optionally signed octal integer, whose format is the same as expected for the subject sequence of the _wwww_cccc_ssss_tttt_oooo_uuuu_llll function with the value 8 for the _b_a_s_e argument. The corresponding argument should be a pointer to unsigned integer. _xxxx Matches an optionally signed hexadecimal integer, whose format is the same as expected for the subject sequence of the _wwww_cccc_ssss_tttt_oooo_uuuu_llll function with the value 16 for the _b_a_s_e argument. The corresponding PPPPaaaaggggeeee 2222 ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) argument should be a pointer to unsigned integer. _iiii Matches an optionally signed integer, whose format is the same as expected for the subject sequence of the _wwww_cccc_ssss_tttt_oooo_llll function with the value 0 for the _b_a_s_e argument. The corresponding argument should be a pointer to integer. _nnnn No input is consumed. The corresponding argument should be a pointer to integer into which is to be written the number of characters read from the input stream so far by the call to the function. Execution of a _%%%%_nnnn directive does not increment the assignment count returned at the completion of execution of the function. _eeee,_ffff,_gggg Matches an optionally signed floating point number, whose format is the same as expected for the subject string of the _wwww_cccc_ssss_tttt_oooo_dddd function. In the absence of a size modifier, the corresponding argument must be a pointer to float. If the fwprintf() family of functions generates character string representations for infinity and NaN (a 7858 symbolic entity encoded in floating-point format) to support the ANSI/IEEE Std 754:1985 standard, the fwscanf() family of functions will recognise them as input. _ssss Matches a sequence of non white-space wide-characters. If no _llll _((((_eeee_llll_llll_)))) qualifier is present, characters from the input field are converted as if by repeated calls to the wcrtomb() function, with the conversion state described by an mbstate_t object initialised to zero before the first wide-character is converted. The corresponding argument must be a pointer to a character array large enough to accept the sequence and the terminating null character, which will be added automatically. Otherwise, the corresponding argument must be a pointer to an array of wchar_t large enough to accept the sequence and the terminating null wide-character, which will be added automatically. _SSSS Same as _llll_ssss _cccc Matches a sequence of wide-characters of the number specified by the field width (1 if no field width is present in the conversion specification). If no _llll _((((_eeee_llll_llll_)))) qualifier is present, wide-characters from the input field are converted as if by repeated calls to the wcrtomb() function, with the conversion state described by an mbstate_t object initialised to zero before the first wide-character is converted. The corresponding argument must be a pointer to a character array large enough to accept the sequence. No null character is added. Otherwise, the corresponding argument must be a pointer to an array of wchar_t large enough to accept the sequence. No null wide-character is added. The normal skip over white space is suppressed. PPPPaaaaggggeeee 3333 ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) _CCCC Same as _llll_cccc _[[[[ Matches a nonempty sequence of characters from a set of expected characters (the _s_c_a_n_s_e_t). The corresponding argument should be a pointer to the initial character of an array large enough to accept the sequence and a terminating null character, which will be added automatically. The conversion specifier includes all subsequent characters in the _f_o_r_m_a_t string, up to and including the matching right bracket (_]]]]). The characters between the brackets (the _s_c_a_n_l_i_s_t) comprise the scanset, unless the character after the left bracket is a circumflex (_^^^^), in which case the scanset contains all characters that do not appear in the scanlist between the circumflex and the right bracket. If the conversion specifier begins with _[[[[_]]]] or _[[[[_^^^^_]]]], the right bracket character is in the scanlist and the next right bracket character is the matching right bracket that ends the specification; otherwise the first right bracket character is the one that ends the specification. A range of characters in the scanset may be represented by the construct _f_i_r_s_t _---- _l_a_s_t; thus _[[[[_0000_1111_2222_3333_4444_5555_6666_7777_8888_9999_]]]] may be expressed _[[[[_0000_----_9999_]]]]. Using this convention, _f_i_r_s_t must be lexically less than or equal to _l_a_s_t, or else the dash will stand for itself. The character _---- will also stand for itself whenever it is the first or the last character in the scanlist. To include the right bracket as an element of the scanset, it must appear as the first character (possibly preceded by a circumflex) of the scanlist and in this case it will not be syntactically interpreted as the closing bracket. At least one character must match for this conversion to be considered successful. _pppp Matches an implementation-defined set of sequences, which should be the same as the set of sequences that may be produced by the _%%%%_pppp conversion of the _ffff_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff function. The corresponding argument should be a pointer to _vvvv_oooo_iiii_dddd. The interpretation of the input item is implementation-defined. If the input item is a value converted earlier during the same program execution, the pointer that results shall compare equal to that value; otherwise, the behavior of the _%%%%_pppp conversion is undefined. If an invalid conversion character follows the _%%%%, the results of the operation may not be predictable. The conversion specifiers _EEEE, _GGGG, and _XXXX are also valid and behave the same as _eeee, _gggg, and _xxxx, respectively. Each function allows for detection of a language-dependent decimal-point character in the input string. The decimal-point character is defined by the program's locale (category _LLLL_CCCC______NNNN_UUUU_MMMM_EEEE_RRRR_IIII_CCCC). In the _""""_CCCC_"""" locale, or in a locale where the decimal-point character is not defined, the decimal- point character defaults to a period (_....). PPPPaaaaggggeeee 4444 ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) If end-of-file is encountered during input, conversion is terminated. If end-of-file occurs before any wide-characters matching the current conversion specification (except for %n) have been read (other than leading white-space, where permitted), execution of the current conversion specification terminates with an input failure. Otherwise, unless execution of the current conversion specification is terminated with a matching failure, execution of the following conversion specification (if any) is terminated with an input failure. Reaching the end of the string in swscanf() is equivalent to encountering end-of-file for fwscanf(). If conversion terminates on a conflicting input character, the offending input character is left unread in the input stream. Trailing white space (including newline characters) is left unread unless matched by a directive. The success of literal matches and suppressed assignments is not directly determinable other than via the _%%%%_nnnn directive. The _ffff_wwww_ssss_cccc_aaaa_nnnn_ffff_((((_)))) and _wwww_ssss_cccc_aaaa_nnnn_ffff_((((_)))) functions may mark the st_atime field of the file associated with stream for update. The st_atime field will be marked for update by the first successful execution of _ffff_gggg_eeee_tttt_cccc_((((_)))), _ffff_gggg_eeee_tttt_wwww_cccc_((((_)))), _ffff_gggg_eeee_tttt_ssss_((((_)))), _ffff_gggg_eeee_tttt_wwww_ssss_((((_)))), _ffff_rrrr_eeee_aaaa_dddd_((((_)))), _gggg_eeee_tttt_cccc_((((_)))), _gggg_eeee_tttt_wwww_cccc_((((_)))), _gggg_eeee_tttt_cccc_hhhh_aaaa_rrrr_((((_)))), _gggg_eeee_tttt_wwww_cccc_hhhh_aaaa_rrrr_((((_)))), _gggg_eeee_tttt_ssss_((((_)))), _ffff_ssss_cccc_aaaa_nnnn_ffff_((((_)))) or _ffff_wwww_ssss_cccc_aaaa_nnnn_ffff_((((_)))) using stream that returns data not supplied by a prior call to _uuuu_nnnn_gggg_eeee_tttt_cccc_((((_)))). EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS The call to the function _wwww_ssss_cccc_aaaa_nnnn_ffff: _iiii_nnnn_tttt _iiii_,,,, _nnnn_;;;; _ffff_llll_oooo_aaaa_tttt _xxxx_;;;; _cccc_hhhh_aaaa_rrrr _nnnn_aaaa_mmmm_eeee_[[[[_5555_0000_]]]]_;;;; _nnnn _==== _wwww_ssss_cccc_aaaa_nnnn_ffff _((((_LLLL_""""_%%%%_dddd_%%%%_ffff_%%%%_ssss_""""_,,,, _&&&&_iiii_,,,, _&&&&_xxxx_,,,, _nnnn_aaaa_mmmm_eeee_))))_;;;; with the input line: _2222_5555 _5555_4444_...._3333_2222_EEEE_----_1111 _tttt_hhhh_oooo_mmmm_pppp_ssss_oooo_nnnn will assign to _nnnn the value _3333, to _iiii the value _2222_5555, to _xxxx the value _5555_...._4444_3333_2222, and _nnnn_aaaa_mmmm_eeee will contain _tttt_hhhh_oooo_mmmm_pppp_ssss_oooo_nnnn_\\\\_0000. The call to the function _wwww_ssss_cccc_aaaa_nnnn_ffff: _iiii_nnnn_tttt _iiii_;;;; _ffff_llll_oooo_aaaa_tttt _xxxx_;;;; _cccc_hhhh_aaaa_rrrr _nnnn_aaaa_mmmm_eeee_[[[[_5555_0000_]]]]_;;;; _((((_vvvv_oooo_iiii_dddd_)))) _wwww_ssss_cccc_aaaa_nnnn_ffff _((((_LLLL_""""_%%%%_2222_dddd_%%%%_ffff_%%%%_****_dddd _%%%%_[[[[_0000_----_9999_]]]]_""""_,,,, _&&&&_iiii_,,,, _&&&&_xxxx_,,,, _nnnn_aaaa_mmmm_eeee_))))_;;;; with the input line: _5555_6666_7777_8888_9999 _0000_1111_2222_3333 _5555_6666_aaaa_7777_2222 will assign _5555_6666 to _iiii, _7777_8888_9999_...._0000 to _xxxx, skip _0000_1111_2222_3333, and place the characters _5555_6666_\\\\_0000 in _nnnn_aaaa_mmmm_eeee. The next character read from _ssss_tttt_dddd_iiii_nnnn will be _aaaa. PPPPaaaaggggeeee 5555 ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) ffffwwwwssssccccaaaannnnffff((((3333SSSS)))) NNNNOOOOTTTTEEEESSSS These functions are supported in n32 and 64 bit C Libraries for IRIX 6.5.17 and later versions. SSSSEEEEEEEE AAAALLLLSSSSOOOO _gggg_eeee_tttt_wwww_cccc(3S), _ffff_wwww_pppp_rrrr_iiii_nnnn_tttt_ffff(3S), _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C), _wwww_cccc_tttt_oooo_mmmm_bbbb(3C), _wwww_cccc_ssss_tttt_oooo_dddd(3S), _wwww_cccc_ssss_tttt_oooo_llll(3S), _wwww_cccc_ssss_tttt_oooo_uuuu_llll(3S), _llll_aaaa_nnnn_gggg_iiii_nnnn_ffff_oooo(5), _ssss_tttt_dddd_iiii_oooo(3S). DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS These routines return the number of successfully matched and assigned input items; this number can be zero in the event of an early matching failure between an input character and the control string. If the input ends before the first matching failure or conversion, _EEEE_OOOO_FFFF is returned. In addition, all forms of fwscanf() may fail if: [EILSEQ] Input byte sequence does not form a valid character. [EINVAL] There are insufficient arguments. PPPPaaaaggggeeee 6666